<?php
class OrderCheck extends Check {
    public function isHasCancel(Model &$model,$condition) {
        if(!$model->isOne($condition)) {
            $this->flag = false;
            $this->message[] = '请确认此订单状态已取消方可删除!';
        }
        return $this->flag;
    }
    public function isCart() {
        if(!isset($_COOKIE['cart'])) {
            $this->flag = false;
            $this->message[] = '购物车空空的，请先购物再来结算吧!';
        }
        return $this->flag;
    }
    public function isPostGooods($data) {
        if($data != '已发货') {
            $this->flag = false;
            $this->message[] = '对不起，该订单的商品尚未发货，您不能够进行此次评价!';
        }
        return $this->flag;
    }
}


?>